/**
 * 
 */
package com.service.pub;

import java.io.IOException;

import com.pub.exception.NullEnvironmentVariableException;
import com.pub.pub.ConfigureFile;

/**
 * @author iling
 *
 */
public class ConfigureServices
{
	public static ConfigureFile configureFile;
	

	
	/**
	 * 
	 */
	public ConfigureServices() 
	{
		configureFile = new ConfigureFile();
		
		try {
			configureFile.loadPropertyFile(ConfigureServices.class.getSimpleName() + ".properties");
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (NullEnvironmentVariableException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}

	/**
	 * 
	 */
	public ConfigureServices(Object propertyFileName) 
	{
		configureFile = new ConfigureFile();
		
		try {
			configureFile.loadPropertyFile(propertyFileName + ".properties");
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (NullEnvironmentVariableException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
}
